<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
    var t = async_test('Makes sure link preload headers are loaded on subresources');
</script>
<script src="resources/link-preload-js.php"></script>
<script src="../resources/slow-script.pl?delay=200"></script>
<script>
    window.addEventListener("load", t.step_func(function() {
        for (let x of performance.getEntriesByType("resource")) {
          console.log(x.name)
        }
        assert_equals(performance.getEntriesByType("resource").length, 5);
        t.done();
    }));
</script>
